package com.sunrise.xdoc.service;

import java.util.List;
import java.util.Map;

import com.sunrise.xdoc.entity.operator.Function;
import com.sunrise.xdoc.entity.operator.Module;
import com.sunrise.xdoc.entity.operator.OperatorProfile;
import com.sunrise.xdoc.entity.operator.Privilege;

/**
 * Operator service
 * 
 * @author PhanHongPhuc
 * 
 */
public interface IOperatorService {
	/**
	 * Get map module 2 functions list. Just get the active functions
	 * 
	 * @return
	 */
	public Map<Module, List<Function>> getMapModule2Functions();

	public List<Privilege> getPrivilegeByOperatorProfileId(Long operatorProfileId);

	public OperatorProfile getOperatorProfile(Long operatorProfileId);

	/**
	 * Save or update privileges have mode not empty. The privileges have empty
	 * mode will be deleted.
	 * 
	 * @param privileges
	 */
	public void saveOrUpdatePrivileges(List<Privilege> privileges);

	/**
	 * Delete all privileges.
	 * 
	 * @param privileges
	 *            the privileges deleted
	 */
	public void deletePrivileges(List<Privilege> privileges);
}
